home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2304 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  889 b 

  1. Path: news.bridge.net!news
  2. From: David Byrden <100101.2547@compuserve.com>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Recursive Definition?
  5. Date: 17 Jan 1996 00:41:46 GMT
  6. Organization: self-employed
  7. Message-ID: <4dhgka$u9c@news.bridge.net>
  8. References: <4df39j$f80@news.vcd.hp.com>
  9. NNTP-Posting-Host: ppp-mia2-81.bridge.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  14.  
  15.  
  16. >> const Switch Switch::On = 1;
  17. >> const Switch Switch::Off = 0;
  18.  
  19. >> What are the above two statements trying to initialize?
  20. >> It seems to me that they are sort of doing a recursive
  21. >> initialization.  Please help!!!!
  22.  
  23. This is an ordinary initialisation of two static member variables.
  24. On and Off are two 'permanent' Switch objects. Their names are in the 
  25. class namespace. Their initial values are as specified above.
  26.  
  27.    David
  28.  
  29.  
  30.